<template>
	<fui-nav-bar title="我的装备" @leftClick="leftClick">
		<fui-icon name="arrowleft"></fui-icon>
	</fui-nav-bar>
</template>

<script>
import { defineComponent, onMounted, reactive, toRefs } from 'vue';
import { useFunctionStore } from '@/store/equipment/index.js';
import { onShow } from '@dcloudio/uni-app';

import { findEquipment } from '@/request/modules/home.js';

export default defineComponent({
	setup() {
		const state = reactive({});
		const store = useFunctionStore();
		const leftClick = () => {
			store.navigateBack();
		};
		const myData = [];

		const findData = () => {
			const storedJsonData = uni.getStorageSync('Equipment');
			const retrievedArray = JSON.parse(storedJsonData);
			myData.push(...retrievedArray);
			console.log(myData, '重新拿出来的数据');
		};

		onMounted(() => {
			findData();
		});

		return {
			...toRefs(state),
			leftClick
		};
	}
});

onMounted(() => {
	console.log(1111111);
});

onShow(() => {});
</script>

<style></style>
